import { BfPage } from '@bud-fe/react-pc-ui';
import { message } from 'antd';
import { useHistory } from 'ice';

export default function ForgetPWD() {
  const history = useHistory();

  return (
    <BfPage.ForgetPWD
      // TODO: 主题若为“品牌黄”，设置 type="yellow"
      type="red"
      // TODO: 若为手机验证码重置，设置 captchaType='phone'，默认为 'email'。captchaType 属性仅在 type="red" 时才有
      // captchaType="email"
      onResetSuccess={() => {
        message.success('重置密码成功，请重新登录');
        setTimeout(() => {
          history.replace('/login');
        }, 500);
      }}
      onCancel={() => {
        history.replace('/login');
      }}
    />
  );
}
